import { Modal } from 'antd';
import React from 'react';

export type Props = {
  onOk: (values: API.InterfaceInfo) => Promise<void>;
  onCancel: () => void;
  isOpen: boolean;
};
const confirmModal: React.FC<Props> = (props: Props) => {
  const { isOpen, onCancel, onOk } = props;
  return (
    <Modal
      title={'Do you Want to delete these items?'}
      footer={null}
      onCancel={() => onCancel?.()}
      open={isOpen}
      onOk={(value) => onOk?.(value)}
    ></Modal>
  );
};

export default confirmModal;
